home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / dgemms.z / dgemms
Encoding:
Text File  |  2002-10-03  |  12.7 KB  |  331 lines

  1.  
  2.  
  3.  
  4. DDDDGGGGEEEEMMMMMMMMSSSS((((3333SSSS))))                                                          DDDDGGGGEEEEMMMMMMMMSSSS((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      DDDDGGGGEEEEMMMMMMMMSSSS - Multiplies a real general matrix by a real general matrix, using
  10.      Strassen's algorithm
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      Fortran:
  14.  
  15.           CCCCAAAALLLLLLLL DDDDGGGGEEEEMMMMMMMMSSSS ((((_t_r_a_n_s_a,,,, _t_r_a_n_s_b,,,, _m,,,, _n,,,, _k,,,, _a_l_p_h_a,,,, _a,,,, _l_d_a,,,, _b,,,, _l_d_b,,,, _b_e_t_a,,,,
  16.           _c,,,, _l_d_c))))
  17.  
  18.      C/C++:
  19.           ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  20.           vvvvooooiiiidddd ddddggggeeeemmmmmmmmssss ((((cccchhhhaaaarrrr *_t_r_a_n_s_a,,,, cccchhhhaaaarrrr *_t_r_a_n_s_b,,,, iiiinnnntttt _m,,,, iiiinnnntttt _n,,,, iiiinnnntttt _k,,,, ddddoooouuuubbbblllleeee
  21.           _a_l_p_h_a,,,, ddddoooouuuubbbblllleeee *_a,,,, iiiinnnntttt _l_d_a,,,, ddddoooouuuubbbblllleeee *_b,,,, iiiinnnntttt _l_d_b,,,, ddddoooouuuubbbblllleeee _b_e_t_a,,,, ddddoooouuuubbbblllleeee
  22.           *_c,,,, iiiinnnntttt _l_d_c);
  23.  
  24. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  25.      These routines are part of the SCSL Scientific Library and can be loaded
  26.      using either the ----llllssssccccssss or the ----llllssssccccssss____mmmmpppp option.  The ----llllssssccccssss____mmmmpppp option
  27.      directs the linker to use the multi-processor version of the library.
  28.  
  29.      When linking to SCSL with ----llllssssccccssss or ----llllssssccccssss____mmmmpppp, the default integer size is
  30.      4 bytes (32 bits). Another version of SCSL is available in which integers
  31.      are 8 bytes (64 bits).  This version allows the user access to larger
  32.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  33.      by using the ----llllssssccccssss____iiii8888 option or the ----llllssssccccssss____iiii8888____mmmmpppp option. A program may use
  34.      only one of the two versions; 4-byte integer and 8-byte integer library
  35.      calls cannot be mixed.
  36.  
  37.      The C and C++ prototypes shown above are appropriate for the 4-byte
  38.      integer version of SCSL. When using the 8-byte integer version, the
  39.      variables of type iiiinnnntttt become lllloooonnnngggg lllloooonnnngggg and the <<<<ssssccccssssllll____bbbbllllaaaassss____iiii8888....hhhh>>>> header
  40.      file should be included.
  41.  
  42. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  43.      DDDDGGGGEEEEMMMMMMMMSSSS multiplies a double precision general matrix by a double precision
  44.      general matrix.
  45.  
  46.      This routine is an implementation of the Winograd's variation of
  47.      Strassen's algorithm for matrix multiplication.  Because of a very
  48.      different order of operations performed by the Strassen's algorithm,
  49.      numerical results from DDDDGGGGEEEEMMMMMMMMSSSS may differ slightly from those of DDDDGGGGEEEEMMMMMMMM.
  50.  
  51.      DDDDGGGGEEEEMMMMMMMMSSSS is functionally equivalent to DDDDGGGGEEEEMMMMMMMM, but it does require temporary
  52.      space which it allocates and manages automatically.
  53.  
  54.      This routine performs one of the matrix-matrix operations:
  55.  
  56.           _C  <- _a_l_p_h_a _o_p(_A) _o_p(_B) + _b_e_t_a _C
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DDDDGGGGEEEEMMMMMMMMSSSS((((3333SSSS))))                                                          DDDDGGGGEEEEMMMMMMMMSSSS((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      where _o_p(_X) is one of the following:
  75.  
  76.           _o_p(_X) = _X
  77.  
  78.           _o_p(_X) = _X_T
  79.  
  80.      where
  81.  
  82.      *   _a_l_p_h_a and _b_e_t_a are scalars
  83.  
  84.      *   _A, _B, and _C are matrices
  85.  
  86.      *   _o_p(_A) is an _m-by-_k matrix
  87.  
  88.      *   _o_p(_B) is a _k-by-_n matrix
  89.  
  90.      *   _C is an _m-by-_n matrix
  91.  
  92.      *   _XT is the transpose of _X
  93.  
  94.      See the NOTES section of this man page for information about the
  95.      interpretation of the data types described in the following arguments.
  96.  
  97.      This routine has the following arguments:
  98.  
  99.      _t_r_a_n_s_a    Character.  (input)
  100.                Specifies the form of _o_p(_A) to be used in the matrix
  101.                multiplication, as follows:
  102.  
  103.                _t_r_a_n_s_a = 'N' or 'n':  _o_p(_A) = _A
  104.  
  105.                _t_r_a_n_s_a = 'T' or 't':  _o_p(_A) = _A_T
  106.  
  107.                _t_r_a_n_s_a = 'C' or 'c':  _o_p(_A) = _A_T
  108.  
  109.                For C/C++, a pointer to this character is passed.
  110.  
  111.      _t_r_a_n_s_b    Character.  (input)
  112.                Specifies the form of _o_p(_B) to be used in the matrix
  113.                multiplication, as follows:
  114.  
  115.                _t_r_a_n_s_b = 'N' or 'n':  _o_p(_B) = _B
  116.  
  117.                _t_r_a_n_s_b = 'T' or 't':  _o_p(_B) = _B_T
  118.  
  119.                _t_r_a_n_s_b = 'C' or 'c':  _o_p(_B) = _B_T
  120.  
  121.                For C/C++, a pointer to this character is passed.
  122.  
  123.      _m         Integer.  (input)
  124.                Specifies the number of rows in matrix _o_p(_A) and in matrix _C.
  125.                _m must be >= 0.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. DDDDGGGGEEEEMMMMMMMMSSSS((((3333SSSS))))                                                          DDDDGGGGEEEEMMMMMMMMSSSS((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      _n         Integer.  (input)
  141.                Specifies the number of columns in matrix _o_p(_B) and in matrix
  142.                _C.  _n must be >= 0.
  143.  
  144.      _k         Integer.  (input)
  145.                Specifies the number of columns of matrix _o_p(_A) and the number
  146.                of rows of matrix _o_p(_B).  _k must be >= 0.
  147.  
  148.      _a_l_p_h_a     Double precision.  (input)
  149.                Scalar factor.
  150.  
  151.      _a         Double precision array of dimension (_l_d_a,_k_a).  (input)
  152.                When _t_r_a_n_s_a = 'N' or 'n', _k_a is _k; otherwise, it is _m.
  153.                Contains the matrix _A.
  154.  
  155.                Before entry with _t_r_a_n_s_a = 'N' or 'n', the leading _m-by-_k part
  156.                of array _a must contain matrix _A; otherwise, the leading _k-by-_m
  157.                part of array _a must contain matrix _A.
  158.  
  159.      _l_d_a       Integer.  (input)
  160.                Specifies the first dimension of _a as declared in the calling
  161.                (sub)program.  When _t_r_a_n_s_a = 'N' or 'n', _l_d_a >= MMMMAAAAXXXX(1,_m);
  162.                otherwise, _l_d_a >= MMMMAAAAXXXX(1,_k).
  163.  
  164.      _b         Double precision array of dimension (_l_d_b,_k_b).  (input)
  165.                When _t_r_a_n_s_b = 'N' or 'n', _k_b is _n; otherwise, it is _k.
  166.                Contains the matrix _B.
  167.  
  168.                Before entry with _t_r_a_n_s_b = 'N' or 'n', the leading _k-by-_n part
  169.                of array _b must contain matrix _B; otherwise, the leading _n-by-_k
  170.                part of array _b must contain matrix _B.
  171.  
  172.      _l_d_b       Integer.  (input)
  173.                Specifies the first dimension of _b as declared in the calling
  174.                (sub)program.
  175.                When _t_r_a_n_s_b = 'N' or 'n', _l_d_b >= MMMMAAAAXXXX(1,_k); otherwise, _l_d_b >=
  176.                MMMMAAAAXXXX(1,_n).
  177.  
  178.      _b_e_t_a      Double precision.  (input)
  179.                Scalar factor.  When _b_e_t_a is supplied as 0, _c need not be set
  180.                on input.
  181.  
  182.      _c         Double precision array of dimension (_l_d_c,_n).  (input and
  183.                output)
  184.                Contains the matrix _C.
  185.  
  186.                Before entry, the leading _m-by-_n part of array _c must contain
  187.                matrix _C, except when _b_e_t_a is 0; in which case, _c need not be
  188.                set.  On exit, the _m-by-_n result matrix overwrites array _c.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. DDDDGGGGEEEEMMMMMMMMSSSS((((3333SSSS))))                                                          DDDDGGGGEEEEMMMMMMMMSSSS((((3333SSSS))))
  203.  
  204.  
  205.  
  206.      _l_d_c       Integer.  (input)
  207.                Specifies the first dimension of _c as declared in the calling
  208.                (sub)program.  _l_d_c >= MMMMAAAAXXXX(1,_m).
  209.  
  210. NNNNOOOOTTTTEEEESSSS
  211.      This routine is an extension to the Level 3 BLAS.
  212.  
  213.      This routine is a modified version of the package developed through the
  214.      PRISM project for multiplying matrices using Strassen's algorithm.
  215.      Please see hhhhttttttttpppp::::////////wwwwwwwwwwww....mmmmccccssss....aaaannnnllll....ggggoooovvvv////PPPPrrrroooojjjjeeeeccccttttssss////PPPPRRRRIIIISSSSMMMM for more details.
  216.  
  217.    DDDDaaaattttaaaa TTTTyyyyppppeeeessss
  218.      The following data types are described in this documentation:
  219.  
  220.           TTTTeeeerrrrmmmm UUUUsssseeeedddd                          DDDDaaaattttaaaa ttttyyyyppppeeee
  221.  
  222.      Fortran:
  223.  
  224.           Array of dimensions (_m,_n)     xxxx((((mmmm,,,,nnnn))))
  225.  
  226.           Character                     CCCCHHHHAAAARRRRAAAACCCCTTTTEEEERRRR
  227.  
  228.           Integer                       IIIINNNNTTTTEEEEGGGGEEEERRRR (IIIINNNNTTTTEEEEGGGGEEEERRRR****8888 for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  229.  
  230.           Double precision              DDDDOOOOUUUUBBBBLLLLEEEE PPPPRRRREEEECCCCIIIISSSSIIIIOOOONNNN
  231.  
  232.      C/C++:
  233.  
  234.           Array of dimensions (_m, _n)    xxxx[[[[mmmm****nnnn]]]]
  235.  
  236.           Character                     cccchhhhaaaarrrr
  237.  
  238.           Integer                       iiiinnnntttt (lllloooonnnngggg lllloooonnnngggg for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  239.  
  240.           Double precision              ddddoooouuuubbbblllleeee
  241.  
  242.      Note that you can explicitly declare multidimensional C/C++ arrays
  243.      provided that the array dimensions are swapped with respect to the
  244.      Fortran declaration (e.g., xxxx[[[[nnnn]]]][[[[mmmm]]]] in C/C++ versus xxxx((((mmmm,,,,nnnn)))) in Fortran).
  245.      To avoid a compiler type mismatch error in C++ (or a compiler warning
  246.      message in C), however, the array should be cast to a pointer of the
  247.      appropriate type when passed as an argument to a SCSL routine.
  248.  
  249. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  250.      IIIINNNNTTTTRRRROOOO____SSSSCCCCSSSSLLLL(3S), IIIINNNNTTTTRRRROOOO____BBBBLLLLAAAASSSS3333(3S)
  251.  
  252.      IIIINNNNTTTTRRRROOOO____CCCCBBBBLLLLAAAASSSS(3S) for information about using the C interface to Fortran 77
  253.      Basic Linear Algebra Subprograms (legacy BLAS) set forth by the Basic
  254.      Linear Algebra Subprograms Technical Forum.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. DDDDGGGGEEEEMMMMMMMMSSSS((((3333SSSS))))                                                          DDDDGGGGEEEEMMMMMMMMSSSS((((3333SSSS))))
  269.  
  270.  
  271.  
  272.      DDDDGGGGEEEEMMMMMMMM(3S), SSSSGGGGEEEEMMMMMMMM(3S) to multiply general matrices by using the more
  273.      standard _i_n_n_e_r _p_r_o_d_u_c_t algorithm
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                                                         PPPPaaaaggggeeee 5555
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.